﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace iLangl.Security
{
	[ServiceContract(Namespace = "http://ilangl.com/security")]
	public interface IAuthenticationService
	{
		[OperationContract]
		String CreateSession(String login, String password);
		/// <summary>
		/// Register user
		/// </summary>
		/// <param name="userName">user name</param>
		/// <param name="password">user password</param>
		/// <returns>
		/// Status
		/// <example>
		/// MembershipCreateStatus Returns like string
		/// </example>
		/// </returns>
		[OperationContract]
		String RegisterUser(String userName, String password);
		[OperationContract]
		bool IsAuthenticated(String sessionKey);
		[OperationContract]
		String GetUserName(String sessionKey);
		[OperationContract]
		String GetUserId(String sessionKey);
	}
}
